<?php
require ($ROOT . 'config/config.php');

class UsuarioIndex{
	
	
	function displayed($smarty,$test){	
			
		$smarty->display($_SERVER["DOCUMENT_ROOT"].'/' . 'interface/templates/user/index.tpl');
	}
	
	function main($db,$param,$smarty){
		$index = new index();
		switch ($param){
			case 1:
				$index -> obtain($db,1,$smarty);		
				break;
			case 2:		
				$index -> insert($db);
				break;
			
			default:
				$index -> displayed($smarty,"Test");
		}
	}
}

$param = $_POST['param'];
index::main($db,$param,$smarty);

?>